package com.woniu108.order.client;

import com.woniu108.carService.commos.dto.CarInfoDto;
import com.woniu108.carService.commos.model.Result;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


/**
 * @author LY
 */
@FeignClient(name = "car-server",path = "/car")
public interface CarClient {
    /**
     *  根据用户id查汽车详情（非token）
     * @param userId 用户id
     * @return 汽车信息dto集合
     */
    @GetMapping("/carInfo/loadCarInfoById/{userId}")
    @ApiOperation("根据用户id查汽车详情（非token）")
    public Result<List<CarInfoDto>> loadCarInfoById(@PathVariable("userId")@RequestParam("userId") String userId);
}
